<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui">

	<h:head>
	     <title>库存信息</title>
	     <style type="text/css">
	         .ui-widget {
	             font-size: 90%;
	         }
	     </style>
	 </h:head>

<h:form>
	<h:panelGrid columns="2" cellpadding="5">

        <p:outputLabel for="id" value="id: " rendered="#{not empty goodsDamageLostForm.id}"/>
        <p:inputText id="id" value="#{goodsDamageLostForm.id}" rendered="#{not empty goodsDamageLostForm.id}" disabled="true"/>

        <p:outputLabel for="transitId" value="transitId: " />
        <p:selectOneMenu id="transitId" value="#{goodsDamageLostForm.transitId}" filter="true" filterMatchMode="contains" style="width:350px">
	        <f:selectItem itemLabel="Select One" itemValue="" />
	        <f:selectItems value="#{cacheDataBean.transitSelectItemList}" />
	    </p:selectOneMenu>

        <p:outputLabel for="goodsId" value="goodsId: " />
        <p:selectOneMenu id="goodsId" value="#{goodsDamageLostForm.goodsId}" filter="true" filterMatchMode="contains" style="width:350px">
	        <f:selectItem itemLabel="Select One" itemValue="" />
	        <f:selectItems value="#{cacheDataBean.goodsSelectItemList}" />
	    </p:selectOneMenu>

        <p:outputLabel for="damageLostId" value="damageLostId: " />
        <p:selectOneMenu id="damageLostId" value="#{goodsDamageLostForm.damageLostId}" filter="true" filterMatchMode="contains" style="width:350px">
	        <f:selectItem itemLabel="Select One" itemValue="" />
	        <f:selectItems value="#{cacheDataBean.goodsDamageLostSelectItemList}" />
	    </p:selectOneMenu>

        <p:outputLabel for="count" value="count: " />
        <p:inputText id="count" value="#{goodsDamageLostForm.count}" size="5" />

        <p:outputLabel for="remark" value="remark:" />
		<p:inputTextarea rows="6" cols="52" id="remark" value="#{goodsDamageLostForm.remark}" />

        <p:commandButton value="登录" actionListener="#{goodsDamageLostBean.registerGoodsDamageLost}" rendered="#{empty goodsDamageLostForm.id}">
        	<p:confirm header="Confirmation" message="Are you sure?" icon="ui-icon-alert" />
        </p:commandButton>
        <p:commandButton value="更新" actionListener="#{goodsDamageLostBean.updateGoodsDamageLost}" rendered="#{not empty goodsDamageLostForm.id}">
        	<p:confirm header="Confirmation" message="Are you sure?" icon="ui-icon-alert" />
        </p:commandButton>

    </h:panelGrid>

	<p:confirmDialog global="true" showEffect="fade" hideEffect="explode">
        <p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
        <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
    </p:confirmDialog>
</h:form>

</ui:composition>